<!DOCTYPE html>
<html style="font-size: 23.4375px;">
<head>
    <include file="./public/header.html"/>
    <style>

    </style>
<body style="font-size: 21.7589px;">
<div id="app">
    <div id="shadow" style="display: none;"></div>
    <header class="top"><span style="display: none;">加载中...</span> <span>银行转账</span> <!---->
        <div class="iconfont back" style="display: none;"></div>
        <a href="{:U('Users/rechargeWay')}" class="iconfont back" style=""></a></header>

   <form action="{:U('Index/ebankPay')}" enctype="multipart/form-data" method="post" id="form">
    <div data-v-06ff19ac="" s="[object Object]" class="">
        <div data-v-06ff19ac="" class="main">
            <table data-v-06ff19ac="">
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">转账银行</td>
                    <td data-v-06ff19ac="">
                         <span data-v-6bb4bdc2=""  class="cGold" id="bank">
                            <?php if($arr["yinhang"]=='1'){echo "工商银行";}
                                    elseif($arr["yinhang"]=='2'){echo "建设银行";}
                                    elseif($arr["yinhang"]=='3'){echo "农业银行";}
                                    elseif($arr["yinhang"]=='4'){echo "民生银行";}
                                    elseif($arr["yinhang"]=='5'){echo "招商银行";}
                                    elseif($arr["yinhang"]=='6'){echo "交通银行";}
                                    elseif($arr["yinhang"]=='7'){echo "中国银行";}
                                    elseif($arr["yinhang"]=='8'){echo "邮政储蓄";}
                                    elseif($arr["yinhang"]=='9'){echo "中信银行";}
                                    elseif($arr["yinhang"]=='10'){echo "兴业银行";}
                                    elseif($arr["yinhang"]=='11'){echo "华夏银行";}
                                    elseif($arr["yinhang"]=='12'){echo "浦发银行";}
                                    elseif($arr["yinhang"]=='13'){echo "广发银行";}
                                    elseif($arr["yinhang"]=='14'){echo "平安银行";}
                                    elseif($arr["yinhang"]=='15'){echo "光大银行";}
                                    elseif($arr["yinhang"]=='16'){echo "农商银行";};?>
                         </span>
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">收款户名</td>
                    <td data-v-06ff19ac="">
                        <input data-v-06ff19ac="" value="{$arr.name}" id="acco" type="text" readonly="readonly" class="cGold">
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">收款账号</td>
                    <td data-v-06ff19ac="">
                        <input data-v-06ff19ac="" value="{$arr.number}" id="card" type="text" readonly="readonly" class="cGold">
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">开户支行</td>
                    <td data-v-06ff19ac="">
                        <input data-v-06ff19ac="" value="{$arr.zhihang}" type="text" id="kh" readonly="readonly" class="cGold">
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">充值金额</td>
                    <td data-v-06ff19ac="">
                        <input data-v-06ff19ac="" type="tel" tag="充值金额"  placeholder="请输入充值金额" class="va81" name="Money" id="c_money" onkeyup="value=value.replace(/[^\d.]/g,'')">
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">转账户名</td>
                    <td data-v-06ff19ac="">
                        <input data-v-06ff19ac="" type="text" tag="转账户名"  placeholder="请输入付款人的银行卡姓名" class="va81" name="PayUser" id="my_name">
                    </td>
                </tr>
            </table>
            <div data-v-06ff19ac="" class="loginBtn BTN">
                <input data-v-06ff19ac="" type="button" value="提交充值订单" onclick="tij()" style="border: none;background: none;width: 335px;height: 42px">
            </div>
            <div data-v-06ff19ac="" class="tips">
                1、请转账完成后再提交充值订单。<br data-v-06ff19ac="">
                2、请正确填写您的户名和充值金额。<br data-v-06ff19ac="">
                3、转账1笔提交1次，请勿重复提交订单。<br data-v-06ff19ac="">
                4、转帐完成后请保留单据作为核对证明。
            </div>
            <!--弹框 begian-->
            <div id="chongzhi" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>汇款成功后，会在一分钟内为您添加额度，请刷新您的账户余额!</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
            <!--弹框 begian-->
            <div id="weikong" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>充值金额或者账户名不能为空</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
            <!--弹框 begian-->
            <div id="je_geshi" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>金额格式不正确</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
            <!--弹框 begian-->
            <div id="je_ds" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>最低10最高500000</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
            <!--弹框 begian-->
            <div id="yinhang1" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>银行卡号长度必须在16到19之间</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
            <!--弹框 begian-->
            <div id="yinhang2" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>银行卡号必须全为数字</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
            <!--弹框 begian-->
            <div id="yinhang3" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>银行卡号开头6位不符合规范</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
        </div> <!----> <!----> <!----> <!---->
    </div>
  </form>
</div>
</body>
</html>

<script>
    $(".layermbtn").click(function(){
        $(".layermbox").hide();
        location.href=location.href;
    });

    function tij(){
        var bank = $("#bank").html();//那个银行
        var acco = $("#acco").val();//银行户主
        var card = $("#card").val();//银行账号
        var kh = $("#kh").val();//银行支行

        var money = $("#c_money").val().replace(/\s/g,"");
        var my_name = $("#my_name").val();

        if(money=="" || my_name==""){
            $("#weikong").show();
            return false;
        }
        var reg = /^[0-9]+(.[0-9]+)?$/; //   ^[0-9]+(.[0-9]{2})?$  限制小数点
        if(!reg.test(money)){
            $("#je_geshi").show();
            return false;
        }
        if(parseInt(money) < 10 || parseInt(money) >500000){
            $("#je_ds").show();
            return false;
        }
        if(my_name.length < 16 || my_name.length > 19) {
            $("#yinhang1").show();
            return false;
        }
        var num = /^\d*$/; //全数字
        if(!num.exec(my_name)) {
            $("#yinhang2").show();
            return false;
        }
        //开头6位
        var strBin = "10,18,30,35,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,62,65,68,69,84,87,88,94,95,98,99";
        if(strBin.indexOf(my_name.substring(0, 2)) == -1) {
            $("#yinhang3").show();
            return false;
        }
        $.ajax({
            type: "POST",
            url: "{:U('Users/ebankPay')}",
            data: {'bank': bank,'acco': acco,'card': card,'kh': kh,'money': money,'my_name': my_name},
            success: function (dat) {
                $("#chongzhi").show();
            }
        });
    }
</script>